package com.aspose.cells.a.d;

import com.aspose.cells.Color;

public class zcd extends zce {
   public zcd(zcb var1, zcn var2) {
      super(var1, var2);
   }

   protected void a(zcj var1) throws Exception {
      switch(var1.d()) {
      case 2:
         this.c(0);
         break;
      case 3:
         this.e(0);
         break;
      case 4:
         this.b(0);
         break;
      case 5:
         this.c(4);
         break;
      case 6:
         this.b(4);
         break;
      case 7:
         this.d(0);
         break;
      case 8:
         this.f(0);
         break;
      case 9:
         this.F();
         break;
      case 10:
         this.E();
         break;
      case 11:
         this.J();
         break;
      case 12:
         this.I();
         break;
      case 13:
         this.H();
      case 14:
      case 16:
      case 23:
      case 26:
      case 28:
      case 29:
      case 41:
      case 48:
      case 50:
      case 51:
      case 52:
      case 53:
      case 65:
      case 66:
      case 68:
      case 69:
      case 71:
      case 72:
      case 73:
      case 74:
      case 78:
      case 79:
      case 80:
      case 99:
      case 100:
      case 101:
      case 102:
      case 103:
      case 104:
      case 105:
      case 106:
      case 107:
      case 108:
      case 109:
      case 110:
      case 111:
      case 112:
      case 113:
      case 114:
      case 115:
      case 116:
      case 117:
      default:
         break;
      case 15:
         this.Z();
         break;
      case 17:
         this.B();
         break;
      case 18:
         this.N();
         break;
      case 19:
         this.D();
         break;
      case 20:
         this.P();
         break;
      case 21:
         this.m();
         break;
      case 22:
         this.L();
         break;
      case 24:
         this.M();
         break;
      case 25:
         this.O();
         break;
      case 27:
         this.X();
         break;
      case 30:
         this.x();
         break;
      case 31:
         this.K();
         break;
      case 32:
         this.G();
         break;
      case 33:
         this.z();
         break;
      case 34:
         this.A();
         break;
      case 35:
         this.o();
         break;
      case 36:
         this.n();
         break;
      case 37:
         this.ak();
         break;
      case 38:
         this.ah();
         break;
      case 39:
         this.ad();
         break;
      case 40:
         this.al();
         break;
      case 42:
         this.aa();
         break;
      case 43:
         this.V();
         break;
      case 44:
         this.W();
         break;
      case 45:
         this.h(0);
         break;
      case 46:
         this.ab();
         break;
      case 47:
         this.ac();
         break;
      case 49:
         this.aj();
         break;
      case 54:
         this.Y();
         break;
      case 55:
         this.h(4);
         break;
      case 56:
         this.g(0);
         break;
      case 57:
         this.C();
         break;
      case 58:
         this.i();
         break;
      case 59:
         this.p();
         break;
      case 60:
         this.q();
         break;
      case 61:
         this.r();
         break;
      case 62:
         this.s();
         break;
      case 63:
         this.u();
         break;
      case 64:
         this.t();
         break;
      case 67:
         this.y();
         break;
      case 70:
         this.an();
         break;
      case 75:
         this.w();
         break;
      case 76:
         this.l();
         break;
      case 77:
         this.k();
         break;
      case 81:
         this.j();
         break;
      case 82:
         this.ag();
         break;
      case 83:
         this.Q();
         break;
      case 84:
         this.S();
         break;
      case 85:
         this.c(1);
         break;
      case 86:
         this.e(1);
         break;
      case 87:
         this.b(1);
         break;
      case 88:
         this.c(5);
         break;
      case 89:
         this.b(5);
         break;
      case 90:
         this.d(1);
         break;
      case 91:
         this.f(1);
         break;
      case 92:
         this.g(1);
         break;
      case 93:
         this.af();
         break;
      case 94:
         this.ae();
         break;
      case 95:
         this.ai();
         break;
      case 96:
         this.U();
         break;
      case 97:
         this.T();
         break;
      case 98:
         this.v();
         break;
      case 118:
         this.am();
      }

   }

   private void i() throws Exception {
      this.e().t();
   }

   private void j() throws Exception {
      this.e().d();
      int var1 = this.e().q();
      int var2 = this.e().q();
      int var3 = this.e().q();
      int var4 = this.e().q();
      int var5 = this.e().q();
      int var6 = this.e().q();
      this.e().q();
      int var7 = this.e().q();
      this.e().q();
      int var8 = this.e().q();
      this.e().q();
      long var9 = (long)this.e().q();
      int var11 = this.e().q();
      int var12 = this.e().q();
      com.aspose.cells.b.a.b.zq var13 = new com.aspose.cells.b.a.b.zq((float)var1, (float)var2, (float)var11, (float)var12);
      if (var8 == 0) {
         this.f().b(var13);
      } else {
         byte[] var14 = zbn.a(this.e(), var7, var8);
         com.aspose.cells.b.a.b.zq var15 = new com.aspose.cells.b.a.b.zq((float)var3, (float)var4, (float)var5, (float)var6);
         this.f().a(var15, var13, var14);
      }
   }

   private void k() throws Exception {
      this.e().d();
      int var1 = this.e().q();
      int var2 = this.e().q();
      int var3 = this.e().q();
      int var4 = this.e().q();
      long var5 = this.e().r() & 4294967295L;
      int var7 = this.e().q();
      int var8 = this.e().q();
      com.aspose.cells.b.a.b.a.zi var9 = this.e().j();
      Color var10 = this.e().e();
      this.e().r();
      this.e().r();
      int var11 = this.e().q();
      this.e().r();
      int var12 = this.e().q();
      com.aspose.cells.b.a.b.zq var13 = new com.aspose.cells.b.a.b.zq((float)var1, (float)var2, (float)var3, (float)var4);
      if (var12 != 0) {
         int var14 = this.e().q();
         int var15 = this.e().q();
         byte[] var16 = zbn.a(this.e(), var11, var12);
         com.aspose.cells.b.a.b.zq var17 = new com.aspose.cells.b.a.b.zq((float)var7, (float)var8, (float)var14, (float)var15);
         this.f().a(var17, var13, var9, var10, var5, var16);
      } else {
         if (var5 == 13369376L || var5 == 15728673L) {
            this.f().b(var13);
         }

      }
   }

   private void l() throws Exception {
      this.k();
   }

   private void m() throws Exception {
      this.a().f(this.e().q());
   }

   private void n() throws Exception {
      com.aspose.cells.b.a.b.a.zi var1 = this.e().j();
      int var2 = this.e().q();
      this.a().a(var1, var2);
      this.f().i();
   }

   private void o() throws Exception {
      com.aspose.cells.b.a.b.a.zi var1 = this.e().j();
      this.a().a(var1);
      this.f().i();
   }

   private void p() {
      this.f().g();
   }

   private void q() throws Exception {
      this.f().h();
   }

   private void r() throws Exception {
      this.f().f();
   }

   private void s() throws Exception {
      this.f().j();
   }

   private void t() throws Exception {
      this.f().k();
   }

   private void u() throws Exception {
      this.f().l();
   }

   private void v() throws Exception {
      this.a().e(this.e().q());
   }

   private void w() throws Exception {
      int var1 = this.e().q();
      int var2 = this.e().q();
      switch(var2) {
      case 5:
         this.f().b(5);
      default:
      }
   }

   private void x() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      com.aspose.cells.b.a.b.zo[] var2 = new com.aspose.cells.b.a.b.zo[]{var1.d(), var1.d()};
      var2[1].a(var2[1].d() + var1.h());
      var2[1].b(var2[1].e() + var1.i());
      this.a().p().a(var2);
      com.aspose.cells.b.a.b.zq var3 = new com.aspose.cells.b.a.b.zq(var2[0], new com.aspose.cells.b.a.b.zt(var2[1].d() - var2[0].d(), var2[1].e() - var2[0].e()));
      this.f().d(var3);
   }

   private void y() throws Exception {
      int var1 = this.e().q();
      this.f().b(var1);
   }

   private void z() {
      this.f().m();
      this.g();
   }

   private void A() {
      this.h();
      this.f().n();
   }

   private void B() throws Exception {
      this.a().c(this.e().q());
      this.a().o();
   }

   private void C() throws Exception {
      this.e().q();
   }

   private void D() throws Exception {
      this.a().d((int)(this.e().r() & 4294967295L));
   }

   private void E() throws Exception {
      this.a().a(this.e().b());
      this.a().o();
   }

   private void F() throws Exception {
      com.aspose.cells.b.a.b.zt var1 = this.e().c();
      this.a().a(var1);
      this.a().o();
   }

   private com.aspose.cells.b.a.b.zt b(com.aspose.cells.b.a.b.zt var1) throws Exception {
      int var2 = this.e().q();
      int var3 = this.e().q();
      int var4 = this.e().q();
      int var5 = this.e().q();
      if (var2 != 0 && var4 != 0) {
         return new com.aspose.cells.b.a.b.zt(var1.b() * (float)var5 / (float)var4, var1.c() * (float)var3 / (float)var2);
      } else {
         throw new Exception("Invalid scale values.");
      }
   }

   private void G() throws Exception {
      com.aspose.cells.b.a.b.zt var1 = this.b(this.a().f().e());
      this.a().n().a(var1.b() / this.a().f().e().b(), var1.c() / this.a().f().e().c());
   }

   private void H() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.e().b();
   }

   private void I() throws Exception {
      this.b(this.e().b());
      this.a().o();
   }

   private void J() throws Exception {
      com.aspose.cells.b.a.b.zt var1 = this.e().c();
      this.a((com.aspose.cells.b.a.b.zt)var1);
      this.a().b(var1);
      this.a().o();
   }

   private void K() throws Exception {
      this.a((com.aspose.cells.b.a.b.zt)this.b(this.c().e()));
      this.a().o();
   }

   private void L() throws Exception {
      this.a().b((int)(this.e().r() & 4294967295L));
   }

   private void M() throws Exception {
      this.a().b(this.e().e());
   }

   private void N() throws Exception {
      this.a().a(this.e().q());
   }

   private void O() throws Exception {
      this.a().a(this.e().e());
   }

   private void P() throws Exception {
      this.a().h(this.e().q());
   }

   private void Q() throws Exception {
      this.S();
   }

   private void R() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.e().b();
      int var2 = this.e().q();
      this.e().q();
      int var3 = this.e().q();
      com.aspose.cells.b.a.b.zq var4 = this.e().d();
      if (var3 == 2) {
         com.aspose.cells.b.a.b.zu var5 = new com.aspose.cells.b.a.b.zu(Color.fromArgb(255, this.a().g().getR() & 255, this.a().g().getG() & 255, this.a().g().getB() & 255));

         try {
            this.f().a((com.aspose.cells.b.a.b.zq)var4, (com.aspose.cells.b.a.b.zc)var5);
         } finally {
            if (var5 != null) {
               var5.f();
            }

         }
      }

      int var9 = this.e().q();
      String var6 = this.e().b(var2);
      if (var2 != 0) {
         this.f().b(var1, var6);
      }
   }

   private void a(int var1) throws Exception {
      com.aspose.cells.b.a.b.zo var3 = this.e().b();
      int var2 = var1 + 8;
      int var4 = this.e().q();
      var2 += 4;
      int var5 = this.e().q();
      var2 += 4;
      int var6 = this.e().q();
      var2 += 4;
      com.aspose.cells.b.a.b.zq var7 = this.e().d();
      var2 += 16;
      if (var6 == 2) {
         com.aspose.cells.b.a.b.zu var8 = new com.aspose.cells.b.a.b.zu(Color.fromArgb(255, this.a().g().getR() & 255, this.a().g().getG() & 255, this.a().g().getB() & 255));

         try {
            this.f().a((com.aspose.cells.b.a.b.zq)var7, (com.aspose.cells.b.a.b.zc)var8);
         } finally {
            if (var8 != null) {
               var8.f();
            }

         }
      }

      int var15 = this.e().q();
      var2 += 4;
      String var9;
      if ("Symbol".equals(this.a().e().a())) {
         var9 = this.e().c(var4);
      } else {
         var9 = this.e().b(var4);
      }

      var2 += var4 * 2;
      if (var4 != 0) {
         try {
            if (var15 >= var2 && (var6 & 8320) == 0) {
               this.e().g(var15 - var2);
               this.a().a(new long[var4]);

               for(int var10 = 0; var10 < var4; ++var10) {
                  this.a().s()[var10] = this.e().r();
               }
            }
         } catch (Exception var14) {
            this.a().a((long[])null);
         }

         this.f().b(var3, var9);
      }
   }

   private void S() throws Exception {
      byte var1 = 8;
      com.aspose.cells.b.a.b.zq var2 = this.e().d();
      int var6 = var1 + 16;
      int var3 = this.e().q();
      var6 += 4;
      float var4 = this.e().t();
      var6 += 4;
      float var5 = this.e().t();
      var6 += 4;
      this.g();
      if (var3 == 1) {
         this.a().a(var4);
         this.a().b(var5);
      }

      this.a(var6);
      this.h();
   }

   private void T() throws Exception {
      this.U();
   }

   private void U() throws Exception {
      this.e().d();
      this.e().q();
      this.e().t();
      this.e().t();
      int var1 = this.e().q();

      for(int var2 = 0; var2 < var1; ++var2) {
         this.R();
      }

   }

   private void V() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      this.f().a(var1);
   }

   private void W() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      com.aspose.cells.b.a.b.zt var2 = this.e().c();
      this.f().a(var1, var2);
   }

   private void X() throws Exception {
      this.a((com.aspose.cells.b.a.b.zo)this.e().b());
   }

   private void Y() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.e().b();
      this.f().a(var1);
      this.a((com.aspose.cells.b.a.b.zo)var1);
   }

   private void Z() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.e().b();
      Color var2 = this.e().e();
      this.f().a(var1, var2);
   }

   private com.aspose.cells.b.a.b.zo[] a(com.aspose.cells.b.a.b.zo[] var1) {
      com.aspose.cells.b.a.b.zo[] var2 = new com.aspose.cells.b.a.b.zo[var1.length + 1];
      var2[0] = this.d();
      System.arraycopy(var1, 0, var2, 1, var1.length);
      return var2;
   }

   private void b(int var1) throws Exception {
      this.e().d();
      com.aspose.cells.b.a.b.zo[] var2;
      if (i(var1)) {
         var2 = this.e().g();
      } else {
         var2 = this.e().f();
      }

      if (var2.length >= 1) {
         if (j(var1)) {
            var2 = this.a(var2);
            this.f().a(var2);
            this.a((com.aspose.cells.b.a.b.zo)var2[var2.length - 1]);
         } else {
            this.f().a(var2);
         }

      }
   }

   private void c(int var1) throws Exception {
      this.f().d = this.e().d();
      com.aspose.cells.b.a.b.zo[] var2;
      if (i(var1)) {
         var2 = this.e().g();
      } else {
         var2 = this.e().f();
      }

      if (var2.length >= 1) {
         if (j(var1)) {
            var2 = this.a(var2);
            this.f().c(var2);
            this.a((com.aspose.cells.b.a.b.zo)var2[var2.length - 1]);
         } else {
            this.f().c(var2);
         }

      }
   }

   private void d(int var1) throws Exception {
      this.e().d();
      if (i(var1)) {
         this.f().b(this.e().i());
      } else {
         this.f().b(this.e().h());
      }

   }

   private void e(int var1) throws Exception {
      com.aspose.cells.b.a.b.zq var2 = this.e().d();
      if (i(var1)) {
         this.f().b(this.e().g());
      } else {
         this.f().b(this.e().f());
      }

   }

   private void f(int var1) throws Exception {
      this.e().d();
      if (i(var1)) {
         this.f().a(this.e().i());
      } else {
         this.f().a(this.e().h());
      }

   }

   private void g(int var1) throws Exception {
      this.e().d();
      int var2 = this.e().q();
      com.aspose.cells.b.a.b.zo[] var3;
      if (i(var1)) {
         var3 = this.e().e(var2);
      } else {
         var3 = this.e().d(var2);
      }

      int[] var4 = this.e().f(var2);
      int var5 = 0;

      do {
         if ((var4[var5] & 6) == 6) {
            this.a((com.aspose.cells.b.a.b.zo)var3[var5]);
            ++var5;
         }

         if ((var4[var5] & 2) == 2) {
            this.f().a(var3[var5]);
            this.a((com.aspose.cells.b.a.b.zo)var3[var5]);
            if ((var4[var5] & 1) == 1) {
               break;
            }

            ++var5;
         }

         if ((var4[var5] & 4) == 4) {
            com.aspose.cells.b.a.b.zo[] var6 = new com.aspose.cells.b.a.b.zo[4];
            var6[0] = this.d();
            ++var5;
            var6[1] = var3[var5];
            ++var5;
            var6[2] = var3[var5];
            ++var5;
            var6[3] = var3[var5];
            this.f().c(var6);
            this.a((com.aspose.cells.b.a.b.zo)var3[var5]);
            if ((var4[var5] & 1) == 1) {
               break;
            }
         }
      } while(var5 < var2);

   }

   private void h(int var1) throws Exception {
      com.aspose.cells.b.a.b.zq var2 = this.e().d();
      com.aspose.cells.b.a.b.zo var3 = this.e().b();
      com.aspose.cells.b.a.b.zo var4 = this.e().b();
      this.f().a(var2, var3, var4);
      if ((var1 & 4) == 4) {
         this.a((com.aspose.cells.b.a.b.zo)var4);
      }

   }

   private void aa() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      var1 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g(), Math.abs(var1.h()), Math.abs(var1.i()));
      this.f().c(var1);
   }

   private void ab() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      com.aspose.cells.b.a.b.zo var2 = this.e().b();
      com.aspose.cells.b.a.b.zo var3 = this.e().b();
      this.f().c(var1, var2, var3);
   }

   private void ac() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      com.aspose.cells.b.a.b.zo var2 = this.e().b();
      com.aspose.cells.b.a.b.zo var3 = this.e().b();
      this.f().b(var1, var2, var3);
   }

   private void ad() throws Exception {
      zbp var1 = new zbp();
      var1.a(this.e());
      this.a((zbh)var1);
   }

   private void ae() throws Exception {
      zbp var1 = new zbp();
      var1.b(this.e());
      this.a((zbh)var1);
   }

   private void af() throws Exception {
      this.ae();
   }

   private void ag() throws Exception {
      zbr var1 = new zbr();
      var1.a(this.e());
      this.a((zbh)var1);
   }

   private void ah() throws Exception {
      zbt var1 = new zbt();
      var1.a(this.e());
      this.a((zbh)var1);
   }

   private void ai() throws Exception {
      zbt var1 = new zbt();
      var1.b(this.e());
      this.a((zbh)var1);
   }

   private void aj() throws Exception {
      zbs var1 = new zbs();
      var1.a(this.e());
      this.a((zbh)var1);
   }

   private void ak() throws Exception {
      this.a().a(this.e().r());
   }

   private void al() throws Exception {
      this.a(this.e().r());
   }

   private void am() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.e().d();
      zga[] var2 = new zga[this.e().q()];
      zaw[] var3 = new zaw[this.e().q()];
      int var4 = this.e().q();

      int var5;
      for(var5 = 0; var5 < var2.length; ++var5) {
         var2[var5] = new zga(this.e());
      }

      for(var5 = 0; var5 < var3.length; ++var5) {
         if (var4 == 2) {
            var3[var5] = new zay(this.e(), this.f());
         } else {
            var3[var5] = new zax(this.e(), this.f());
         }
      }

      zaw[] var9 = var3;
      int var6 = var3.length;

      for(int var7 = 0; var7 < var6; ++var7) {
         zaw var8 = var9[var7];
         var8.a(var2);
      }

   }

   private static boolean i(int var0) {
      return (var0 & 1) == 1;
   }

   private static boolean j(int var0) {
      return (var0 & 4) == 4;
   }

   private void an() throws Exception {
      int var1 = this.e().q();
      int var2 = (int)(this.e().r() & 4294967295L);
      switch(var2) {
      case 726027589:
         this.k(var1);
      case 0:
      case 1128875079:
      default:
      }
   }

   private void k(int var1) throws Exception {
      int var2 = this.e().p() & '\uffff';
      switch(var2) {
      case 16385:
      case 16388:
      case 16394:
      case 16395:
      case 16396:
      case 16397:
      case 16398:
      case 16399:
      case 16400:
      case 16401:
      case 16403:
      case 16404:
      case 16405:
      case 16406:
      case 16410:
      case 16411:
      case 16412:
      case 16425:
      case 16438:
         this.ao();
         break;
      case 16386:
         this.e().g(12);
      case 16387:
      case 16393:
      case 16402:
      case 16407:
      case 16408:
      case 16409:
      case 16413:
      case 16414:
      case 16415:
      case 16416:
      case 16417:
      case 16418:
      case 16419:
      case 16420:
      case 16421:
      case 16422:
      case 16423:
      case 16424:
      case 16426:
      case 16427:
      case 16429:
      case 16430:
      case 16431:
      case 16432:
      case 16433:
      case 16434:
      case 16435:
      case 16436:
      case 16437:
      case 16439:
      case 16440:
      case 16441:
      case 16442:
      default:
         break;
      case 16389:
      case 16390:
      case 16391:
      case 16392:
      case 16428:
         this.ap();
      }

   }

   private void ao() throws Exception {
      boolean var1 = (this.e().p() & '\uffff' & 1) == 1;
      this.e().r();
      this.e().r();
      this.e().r();
      this.e().r();
      int var2 = this.e().q();
      int var3 = this.e().q();
   }

   private void ap() throws Exception {
      int var1 = this.e().p() & '\uffff';
      boolean var2 = (var1 & '\uffff' & 1) > 0;
      byte var3 = (byte)((var1 & '\uffff' & 255) >> 1);
      byte var4 = (byte)((var1 & '\uffff') >> 8);
      long var5 = this.e().r();
      long var7 = this.e().r();
      byte[] var9 = this.e().g((int)(var7 & 4294967295L));
   }
}
